package hello_pkg;
import java.sql.Connection;
import java.sql.DriverManager;

public class hello_j {

   public String testFunc() {
        return "Hello class.. func call";
   }

    public String dbConnFunc()
    {
         Connection conn = null;
        /* jdbc:mysql://[hostname]:[port number]/[DB name] */
        String url= "jdbc:mysql://localhost:3306/rorprj_db";
        try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              conn = DriverManager.getConnection(url,"root","1111");
              conn.close();
        }
        catch(Throwable e)
        {
              return e.toString();
        }
        return "Mysql JDBC Driver Connection";
    }
}
